package com.wangshidai.form.permissionForm;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotEmpty;

@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value = "保存权限对象")
public class SavePermissionForm {

    //private Long id;

    /**
     * 父权限 ID (0为顶级菜单)
     */
    @ApiModelProperty(value = "父权限 ID (0为顶级菜单)")
    @NotEmpty(message = "父权限id不能为空")
    private Long parentId;

    /**
     * 权限名称
     */
    @ApiModelProperty(value = "权限名称")
    @NotEmpty(message = "权限名称不能为空")
    private String label;

    /**
     * 授权标识符
     */
    @ApiModelProperty(value = "授权标识符")
    private String code;

    /**
     * 路由地址
     */
    @ApiModelProperty(value = "路由地址")
    private String path;

    /**
     * 路由名称
     */
    @ApiModelProperty(value = "路由名称")
    private String name;

    /**
     * 授权路径
     */
    @ApiModelProperty(value = "授权路径")
    private String url;

    /**
     * 序号
     */
    @ApiModelProperty(value = "序号")
    private Integer orderNum;

    /**
     * 类型(0 目录 1菜单，2按钮)
     */
    @ApiModelProperty(value = "类型(0 目录 1菜单，2按钮)")
    private Integer type;

    /**
     * 图标
     */
    @ApiModelProperty(value = "图标")
    private String icon;

    /**
     * 父级菜单名称
     */
    @ApiModelProperty(value = "父级菜单名称")
    private String parentName;
}
